The Class smg_String

The purpose of the class smg_String is the handling of C++ character strings with the option to perform automatic storage management. A character string that is handled by any smg_String may be managed or not managed; a managed character string will be deleted as soon as it is no longer needed by an smg_String. Assignment and copying of smg_Strings is controlled pointer assignment, that means it does not copy the character string (but only increments a reference counter). An smg_String is in general constructed from a C character string or an sos_String. The scope of a character string is the period from its allocation up to its deallocation or, for a statically declared character array, the period from its declaration up to the end of the enclosing block; the scope of a string literal is the whole program. The scope of an smg_String is the period from its construction up to its destruction (in the sense of C++). The way in which a character string is handled by an smg_String depends on the access specification given to the constructor. For a detailed explanation refer to Appendix [*].